import { Language } from "../../../../extend/language/Language";
import { Cache } from "../../cache/Cache";
import { GTextFiled } from "../../../../com/mui/controls/GTextFiled";
import { WorldLevelBm } from "./WorldLevelBm";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../resource/ImagesConst";
import { LookupPlayerData } from "./LookupPlayerData";
import { GButton } from "../../../../com/mui/controls/GButton";
import { PlayerMiniInfo } from "../../model/PlayerMiniInfo";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { GModuleEvent } from "../../mvc/GModuleEvent";
import { EntityUtil } from "../../scene/layer/utils/EntityUtil";
import { MsgManager } from "../../manager/MsgManager";
import { ObjCreate } from "../common/ObjCreate";
import { FilterConst } from "../../../component/gconst/FilterConst";
import { CareerConfig } from "../../resource/CareerConfig";
import { SFightAttribute } from "../../../../Message/Public/SFightAttribute";
import { CareerUtil } from "../common/util/CareerUtil";
import { GameDefConfig } from "../../resource/GameDefConfig";
import { EVIPType } from "../../../../Message/Public/EVIPType";
import { SPlayerGuildInfo } from "../../../../Message/Game/SPlayerGuildInfo";
import { EToplistType } from "../../../../Message/Public/EToplistType";
import { ESex } from "../../../../Message/Public/ESex";
import { GTextFormat } from "../../../common/GTextFormat";
import { RoleCache } from "../../cache/RoleCache";
type int = number;
//class PlayerAttributePanel
    
    export  class PlayerAttributePanel /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._infoNameArr1 = [Language.getString(30040), Language.getString(30198), Language.getString(30042), Language.getString(30006), Language.getString(30043), Language.getString(30044), Language.getString(30231), Language.getString(30045), Language.getString(30169), Language.getString(30232), Language.getString(30047), ""];
            this._infoNameArr2 = [Language.getString(30300), Language.getString(30054), Language.getString(30304), Language.getString(30057), Language.getString(30056), Language.getString(30305), Language.getString(30301), Language.getString(30058), Language.getString(30306), Language.getString(30302), Language.getString(30060), Language.getString(30307), Language.getString(30303), Language.getString(30062), Language.getString(30308)];
            this._infoNameArr3 = [Language.getString(30053), Language.getString(30063), Language.getString(30059), Language.getString(30055), Language.getString(30064), Language.getString(30061), Language.getString(30167), Language.getString(30299), Language.getString(73008)];
            this._infoNameArr4 = [Language.getString(30065), Language.getString(30066), Language.getString(30067), Language.getString(30068), Language.getString(30069), ""];
            this._infoNameOtherArr1 = [Language.getString(30040), Language.getString(30041), Language.getString(30006), Language.getString(30273), Language.getString(30007), Language.getString(30274), Language.getString(30010), Language.getString(30048)];
            this._infoNameArr5A = [Language.getString(30184)];
            this._infoNameArr5B = [Language.getString(30188)];
            this._infoNameArr5C = [Language.getString(30185), Language.getString(30186), Language.getString(30187)];
            this._nameTxtArr1 = [];
            this._valueTxtArr1 = [];
            this._valueTxtOtherArr1 = [];
            this._valueTxtArr2 = [];
            this._valueTxtArr3 = [];
            this._valueTxtArr4 = [];
            this._valueTxtArr5 = [];
            this._tipsArr = [];
            this.initTips();
            this.init();
            return;
        }

        /* internal  */addSelfRoleInfo(): void
        {
            this._nameTxtArr1 = this.createAttrTextField(this, 12, 5, 3, [120, 270], this._nameTf1, this._infoNameArr1, true);
            this._valueTxtArr1 = this.createAttrTextField(this, 45, 5, 3, [145, 295], this._valueTf, null, false, 12);
            if (Cache.instance.role.entityInfo.level >= 60) 
            {
                (this._nameTxtArr1[11] as GTextFiled).text = Language.getString(30204);
                (this._nameTxtArr1[11] as GTextFiled).toolTipData = Language.getString(30205);
                (this._valueTxtArr1[11] as GTextFiled).toolTipData = Language.getString(30205);
            }
            (this._valueTxtArr1[6] as Object /* flash.text.TextField */).x = (this._valueTxtArr1[6] as Object /* flash.text.TextField */).x + 25;
            (this._valueTxtArr1[9] as Object /* flash.text.TextField */).x = (this._valueTxtArr1[9] as Object /* flash.text.TextField */).x + 25;
            return;
        }

        public setSelfCountryContribution(): void
        {
            (this._nameTxtArr1[5] as GTextFiled).htmlText = Language.getString(30310);
            (this._nameTxtArr1[5] as GTextFiled).toolTipData = Language.getString(30312);
            (this._valueTxtArr1[5] as GTextFiled).text = this._cache.money.countryContribution + "";
            (this._valueTxtArr1[5] as GTextFiled).toolTipData = Language.getString(30312);
            return;
        }

        /* internal  */addOtherRoleInfo(): void
        {
            this.createAttrTextField(this, 12, 5, 2, [150], this._nameTf1, this._infoNameOtherArr1, true);
            this._valueTxtOtherArr1 = this.createAttrTextField(this, 45, 5, 2, [175], this._valueTf, null, false, 8);
            return;
        }

        /* internal  */addWordLevel(): void
        {
            this._worldLevelSp = new Object /* flash.display.Sprite */();
            this._worldLevelSp.x = 7;
            this._worldLevelSp.y = 354;
            addChild(this._worldLevelSp);
            var loc1=new WorldLevelBm();
            loc1.x = 0;
            loc1.y = 4;
            this._worldLevelSp.addChild(loc1);
            var loc2=GlobalClass.getBitmap(ImagesConst.Fire);
            loc2.x = 63;
            loc2.y = 0;
            this._worldLevelSp.addChild(loc2);
            var loc3=[];
            var loc4=[];
            if (Cache.instance.role.curWorldLevel < 55) 
            {
                loc3 = this.createAttrTextField(this._worldLevelSp, 90, 4, 1, [0], this._nameTf2, this._infoNameArr5A, true);
            }
            else 
            {
                loc3 = this.createAttrTextField(this._worldLevelSp, 90, 4, 1, [0], this._nameTf2, this._infoNameArr5B, true);
            }
            loc4 = this.createAttrTextField(this._worldLevelSp, 53, 24, 3, [110, 220], this._nameTf4, this._infoNameArr5C, true);
            this._valueTxtArr5 = this.createAttrTextField(this._worldLevelSp, 133, 24, 3, [111, 221], this._valueTf, null, false, 4);
            this.updateWorldData();
            return;
        }

        /* internal  */onBtnClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            var loc1=null;
            if (LookupPlayerData.lookupData) 
            {
                loc1 = LookupPlayerData.lookupData.miniPlayer.entityId;
            }
            var loc2=arg1.target as GButton;
            var loc3=new PlayerMiniInfo(LookupPlayerData.lookupData.miniPlayer);
            var loc4=loc2.name;
            switch (loc4) 
            {
                case "ChatPirvate":
                {
                    Dispatcher.dispatchEvent(new DataEvent(EventName.ChatPrivate, loc3));
                    break;
                }
                case "AddFriend":
                {
                    if (this.mode == GModuleEvent.Mode_Self || loc1 && EntityUtil.isSameServerByRole(loc1)) 
                    {
                        Dispatcher.dispatchEvent(new DataEvent(EventName.FriendRequestAddFriend, {"name": loc3.playerName}));
                    }
                    else 
                    {
                        MsgManager.showRollTipsMsg(Language.getString(30282));
                    }
                    break;
                }
                case "Trade":
                {
                    if (this.mode == GModuleEvent.Mode_Self || loc1 && EntityUtil.isSameServerByRole(loc1)) 
                    {
                        Dispatcher.dispatchEvent(new DataEvent(EventName.TradeRequest, loc3.entityId));
                    }
                    else 
                    {
                        MsgManager.showRollTipsMsg(Language.getString(30283));
                    }
                    break;
                }
                case "HandselFlower":
                {
                    Dispatcher.dispatchEvent(new DataEvent(EventName.FlowerOpenHandselFlower, loc3));
                    break;
                }
            }
            return;
        }

        /* internal  */addModeOtherOperate(): void
        {
            var loc3=null;
            var loc6=0;
            var loc1=[Language.getString(30275), Language.getString(30276), Language.getString(30277), Language.getString(30278)];
            var loc2=["ChatPirvate", "AddFriend", "Trade", "HandselFlower"];
            var loc4=30;
            var loc5=364;
            while (loc6 < loc1.length) 
            {
                loc3 = ObjCreate.createGButton(loc1[loc6], loc4, loc5, 70, 25, this);
                loc3.name = loc2[loc6];
                loc3.addEventListener(flash.events.MouseEvent.CLICK, this.onBtnClickHandler);
                loc4 = loc4 + 90;
                ++loc6;
            }
            return;
        }

        /* internal  */createAttrTextField(arg1: Object /* flash.display.DisplayObjectContainer */, arg2: int, arg3: int, arg4: int, arg5: Array<any>, arg6: Object /* flash.text.TextFormat */, arg7: Array<any>=null, arg8: Boolean=false, arg9: int=0, arg10: Boolean=false, arg11: Boolean=false): Array<any>
        {
            var loc2=null;
            var loc6=0;
            var loc1=[];
            var loc3=arg2;
            var loc4=arg3;
            var loc5=0;
            if (arg7 == null) 
            {
                loc6 = arg9;
            }
            else 
            {
                loc6 = arg7.length;
            }
            var loc7=0;
            while (loc7 < loc6) 
            {
                (loc2 = new GTextFiled()).x = loc3;
                loc2.y = loc4;
                loc2.height = 20;
                loc2.width = 50;
                loc2.selectable = false;
                loc2.defaultTextFormat = arg6;
                loc2.autoSize = flash.text.TextFieldAutoSize.LEFT;
                if (arg8) 
                {
                    loc2.text = arg7[loc7];
                    loc2.filters = [FilterConst.glowFilter];
                    loc1.push(loc2);
                }
                else 
                {
                    loc2.text = "";
                    loc1.push(loc2);
                }
                arg1.addChild(loc2);
                if (arg11 && loc7 == arg9 - 2) 
                {
                    loc3 = arg2 + arg5[loc5] + 20;
                }
                else 
                {
                    loc3 = arg2 + arg5[loc5];
                }
                ++loc5;
                if ((loc7 + 1) % arg4 == 0) 
                {
                    loc3 = arg2;
                    loc4 = arg3 + 20 * (loc7 + 1) / arg4;
                    loc5 = 0;
                }
                if (arg10 && this._tipsArr[loc7]) 
                {
                    loc2.toolTipData = "<font color=\'#ffffff\'>" + this._tipsArr[loc7] + "</font>";
                }
                ++loc7;
            }
            return loc1;
        }

        public updateInfo(): void
        {
            var loc1=this._cache.entityInfo;
            var loc2=loc1.careerEnable;
            var loc3=CareerConfig.instance.getInfoByCode(loc2).name;
            (this._valueTxtArr1[0] as Object /* flash.text.TextField */).text = loc1.name;
            (this._valueTxtArr1[1] as Object /* flash.text.TextField */).text = this._cache.money.interHonour + "";
            (this._valueTxtArr1[2] as Object /* flash.text.TextField */).text = this._cache.money.honour + "";
            (this._valueTxtArr1[3] as Object /* flash.text.TextField */).text = loc3;
            (this._valueTxtArr1[4] as Object /* flash.text.TextField */).text = Cache.instance.guild.myGuildInfo != null ? Cache.instance.guild.myGuildInfo.contribution + "" : "0";
            if (Cache.instance.country.isOpenCountry) 
            {
                this.setSelfCountryContribution();
            }
            else 
            {
                (this._valueTxtArr1[5] as GTextFiled).text = this._cache.roleInfo.nimbus + "";
                (this._valueTxtArr1[5] as GTextFiled).toolTipData = null;
                (this._nameTxtArr1[5] as GTextFiled).toolTipData = null;
            }
            (this._valueTxtArr1[6] as Object /* flash.text.TextField */).text = this._cache.money.magicStone + "";
            (this._valueTxtArr1[7] as Object /* flash.text.TextField */).text = this._cache.money.arena + "";
            (this._valueTxtArr1[8] as Object /* flash.text.TextField */).text = Cache.instance.role.charm + "";
            (this._valueTxtArr1[9] as Object /* flash.text.TextField */).text = this._cache.money.merit + "";
            (this._valueTxtArr1[10] as Object /* flash.text.TextField */).text = this._cache.money.spiritCoin + "";
            (this._valueTxtArr1[11] as Object /* flash.text.TextField */).text = "";
            if (Cache.instance.role.entityInfo.level >= 60) 
            {
                (this._valueTxtArr1[11] as Object /* flash.text.TextField */).text = Cache.instance.role.roleInfo.newEnergy + "/" + Cache.instance.role.roleInfo.newEnergyMax;
            }
            var loc4=this._cache.fightAttribute;
            this.updateAttribute(loc4, loc2);
            return;
        }

        /* internal  */updateAttribute(arg1: SFightAttribute, arg2: int): void
        {
            if (arg1) 
            {
                (this._valueTxtArr2[0] as Object /* flash.text.TextField */).text = arg1.maxLife + "";
                (this._valueTxtArr2[1] as Object /* flash.text.TextField */).text = arg1.power + "";
                (this._valueTxtArr2[2] as Object /* flash.text.TextField */).text = arg1.goldRelief + "";
                if (arg2 == 0 || CareerUtil.isPhysicalCareer(arg2)) 
                {
                    (this._valueTxtArr2[3] as Object /* flash.text.TextField */).text = arg1.physicalCrit + "";
                }
                else 
                {
                    (this._valueTxtArr2[3] as Object /* flash.text.TextField */).text = arg1.magicCrit + "";
                }
                (this._valueTxtArr2[4] as Object /* flash.text.TextField */).text = arg1.agile + "";
                (this._valueTxtArr2[5] as Object /* flash.text.TextField */).text = arg1.woodRelief + "";
                if (arg2 == 0 || CareerUtil.isPhysicalCareer(arg2)) 
                {
                    (this._valueTxtArr2[6] as Object /* flash.text.TextField */).text = arg1.physicalAttack + "";
                }
                else 
                {
                    (this._valueTxtArr2[6] as Object /* flash.text.TextField */).text = arg1.magicAttack + "";
                }
                (this._valueTxtArr2[7] as Object /* flash.text.TextField */).text = arg1.habitus + "";
                (this._valueTxtArr2[8] as Object /* flash.text.TextField */).text = arg1.waterRelief + "";
                (this._valueTxtArr2[9] as Object /* flash.text.TextField */).text = arg1.physicalDefense + "";
                (this._valueTxtArr2[10] as Object /* flash.text.TextField */).text = arg1.brains + "";
                (this._valueTxtArr2[11] as Object /* flash.text.TextField */).text = arg1.fireRelief + "";
                (this._valueTxtArr2[12] as Object /* flash.text.TextField */).text = arg1.magicDefense + "";
                (this._valueTxtArr2[13] as Object /* flash.text.TextField */).text = arg1.spiritual + "";
                (this._valueTxtArr2[14] as Object /* flash.text.TextField */).text = arg1.earthRelief + "";
                (this._valueTxtArr3[0] as Object /* flash.text.TextField */).text = arg1.hit + "";
                (this._valueTxtArr3[1] as Object /* flash.text.TextField */).text = arg1.speededUp + "";
                (this._valueTxtArr3[2] as Object /* flash.text.TextField */).text = arg1.pass + "";
                (this._valueTxtArr3[3] as Object /* flash.text.TextField */).text = arg1.jouk + "";
                (this._valueTxtArr3[4] as Object /* flash.text.TextField */).text = arg1.toughness + "";
                (this._valueTxtArr3[5] as Object /* flash.text.TextField */).text = arg1.block + "";
                (this._valueTxtArr3[6] as Object /* flash.text.TextField */).text = arg1.relief + "";
                (this._valueTxtArr3[7] as Object /* flash.text.TextField */).text = arg1.maxMana + "";
                (this._valueTxtArr3[8] as Object /* flash.text.TextField */).text = arg1.ignoreRelief + "";
            }
            return;
        }

        public updateOtherRoleInfo(): void
        {
            if (LookupPlayerData.lookupData == null) 
            {
                return;
            }
            var loc1=LookupPlayerData.lookupData.miniPlayer;
            (this._valueTxtOtherArr1[0] as Object /* flash.text.TextField */).text = loc1.name;
            (this._valueTxtOtherArr1[1] as Object /* flash.text.TextField */).text = LookupPlayerData.lookupData.guildName != "" ? LookupPlayerData.lookupData.guildName : Language.getString(30002);
            (this._valueTxtOtherArr1[2] as Object /* flash.text.TextField */).text = CareerConfig.instance.getInfoByCode(loc1.career).name;
            (this._valueTxtOtherArr1[3] as Object /* flash.text.TextField */).text = LookupPlayerData.lookupData.playerMarry.mate.name != "" ? LookupPlayerData.lookupData.playerMarry.mate.name : Language.getString(30002);
            (this._valueTxtOtherArr1[4] as Object /* flash.text.TextField */).text = GameDefConfig.instance.getECamp(loc1.camp);
            (this._valueTxtOtherArr1[5] as Object /* flash.text.TextField */).text = LookupPlayerData.lookupData.titleName != "" ? LookupPlayerData.lookupData.titleName : Language.getString(30013);
            (this._valueTxtOtherArr1[6] as Object /* flash.text.TextField */).text = GameDefConfig.instance.getSex(loc1.sex).name;
            this.updateVIP(loc1.VIP);
            return;
        }

        /* internal  */updateVIP(arg1: int): void
        {
            var loc1=Language.getString(30085);
            if (this._vipImg && this._vipImg.parent) 
            {
                removeChild(this._vipImg);
                this._vipImg = null;
            }
            if (arg1 != EVIPType._EVIPTypeWeek) 
            {
                if (arg1 != EVIPType._EVIPTypeMonth) 
                {
                    if (arg1 == EVIPType._EVIPTypeHalfYear) 
                    {
                        loc1 = Language.getString(30088);
                        this._vipImg = GlobalClass.getBitmap(ImagesConst.TVip3);
                    }
                }
                else 
                {
                    loc1 = Language.getString(30087);
                    this._vipImg = GlobalClass.getBitmap(ImagesConst.TVip2);
                }
            }
            else 
            {
                loc1 = Language.getString(30086);
                this._vipImg = GlobalClass.getBitmap(ImagesConst.TVip1);
            }
            (this._valueTxtOtherArr1[7] as Object /* flash.text.TextField */).text = loc1;
            if (this._vipImg) 
            {
                this._vipImg.x = (this._valueTxtOtherArr1[7] as Object /* flash.text.TextField */).x + (this._valueTxtOtherArr1[7] as Object /* flash.text.TextField */).textWidth;
                this._vipImg.y = 65;
                addChild(this._vipImg);
            }
            return;
        }

        public updateGuideInfo(): void
        {
            (this._valueTxtArr1[4] as Object /* flash.text.TextField */).text = Cache.instance.guild.myGuildInfo != null ? Cache.instance.guild.myGuildInfo.contribution + "" : "0";
            return;
        }

        /* internal  */onDailyDegreeUpdateHandler(arg1: DataEvent): void
        {
            (this._valueTxtArr1[8] as Object /* flash.text.TextField */).text = Cache.instance.daily.totalProcess + "";
            return;
        }

        public attributeCharmChange(): void
        {
            (this._valueTxtArr1[8] as Object /* flash.text.TextField */).text = Cache.instance.role.charm + "";
            return;
        }

        public arenaMarkWeekChange(): void
        {
            return;
        }

        public updateNewEnergyInfo(): void
        {
            if (Cache.instance.role.entityInfo.level >= 60) 
            {
                if ((this._nameTxtArr1[11] as Object /* flash.text.TextField */).text == "") 
                {
                    (this._nameTxtArr1[11] as Object /* flash.text.TextField */).text = Language.getString(30204);
                    (this._nameTxtArr1[11] as GTextFiled).toolTipData = Language.getString(30205);
                    (this._valueTxtArr1[11] as GTextFiled).toolTipData = Language.getString(30205);
                }
                (this._valueTxtArr1[11] as GTextFiled).text = Cache.instance.role.roleInfo.newEnergy + "/" + Cache.instance.role.roleInfo.newEnergyMax;
            }
            return;
        }

        public updateCareerEnable(arg1: int): void
        {
            var loc1=CareerConfig.instance.getInfoByCode(arg1).name;
            (this._valueTxtArr1[3] as Object /* flash.text.TextField */).text = loc1;
            return;
        }

        public updateNimbus(arg1: int): void
        {
            if (!Cache.instance.country.isOpenCountry) 
            {
                (this._valueTxtArr1[5] as Object /* flash.text.TextField */).text = arg1 + "";
            }
            return;
        }

        public updateFightAttribute(arg1: int, arg2: SFightAttribute): void
        {
            this.updateAttribute(arg2, arg1);
            return;
        }

        public updateMoneyInfo(): void
        {
            (this._valueTxtArr1[7] as Object /* flash.text.TextField */).text = this._cache.money.arena + "";
            (this._valueTxtArr1[1] as Object /* flash.text.TextField */).text = this._cache.money.interHonour + "";
            (this._valueTxtArr1[6] as Object /* flash.text.TextField */).text = this._cache.money.magicStone + "";
            (this._valueTxtArr1[9] as Object /* flash.text.TextField */).text = this._cache.money.merit + "";
            (this._valueTxtArr1[2] as Object /* flash.text.TextField */).text = this._cache.money.honour + "";
            (this._valueTxtArr1[10] as Object /* flash.text.TextField */).text = this._cache.money.spiritCoin + "";
            return;
        }

        /* internal  */initTips(): void
        {
            this._tipsArr.push(Language.getString(30070));
            this._tipsArr.push(Language.getString(30080));
            this._tipsArr.push(Language.getString(30076));
            this._tipsArr.push(Language.getString(30072));
            this._tipsArr.push(Language.getString(30081));
            this._tipsArr.push(Language.getString(30078));
            this._tipsArr.push(Language.getString(30168));
            this._tipsArr.push(Language.getString(73013));
            this._tipsArr.push(Language.getString(73014));
            return;
        }

        public updateSelfGuild(arg1: SPlayerGuildInfo=null): void
        {
            var loc1=Language.getString(30002);
            if (!(arg1 == null) && !(arg1.guildName == "")) 
            {
                loc1 = arg1.guildName;
            }
            return;
        }

        public nameChange(arg1: string): void
        {
            (this._valueTxtArr1[0] as Object /* flash.text.TextField */).text = arg1;
            return;
        }

        public updateWorldData(): void
        {
            var loc1=this._cache.curWorldLevel;
            var loc2=this._cache.entityInfo;
            var loc3=loc2.level;
            (this._valueTxtArr5[0] as Object /* flash.text.TextField */).text = loc1.toString();
            (this._valueTxtArr5[1] as Object /* flash.text.TextField */).text = loc3.toString();
            (this._valueTxtArr5[2] as Object /* flash.text.TextField */).text = this._cache.getWorldEx();
            return;
        }

        public set mode(arg1: string)
        {
            this._mode = arg1;
            if (this._mode == GModuleEvent.Mode_Other && this._valueTxtOtherArr1.length <= 0) 
            {
                this.addOtherRoleInfo();
                this.addModeOtherOperate();
            }
            else if (this._mode == GModuleEvent.Mode_Self && this._valueTxtArr1.length <= 0) 
            {
                this.addSelfRoleInfo();
                this.addWordLevel();
            }
            return;
        }

        public get mode(): string
        {
            return this._mode;
        }

        public updateRankInfo(arg1: Map<any, any> /* flash.utils.Dictionary */): void
        {
            var loc2=0;
            if (arg1 == null) 
            {
                return;
            }
            var loc1=[EToplistType._EToplistTypePlayerLevel, EToplistType._EToplistTypeGuildWarPlayerMerits, EToplistType._EToplistTypePlayerFight, EToplistType._EToplistTypeBattleFieldWeekHonor, EToplistType._EToplistTypeFlower];
            if (this._cache.entityInfo.sex == ESex._ESexMan) 
            {
                loc1 = [EToplistType._EToplistTypePlayerLevel, EToplistType._EToplistTypeGuildWarPlayerMerits, EToplistType._EToplistTypePlayerFight, EToplistType._EToplistTypeBattleFieldWeekHonor, EToplistType._EToplistTypeFlowerProtect];
            }
            var loc3=0;
            while (loc3 < loc1.length) 
            {
                loc2 = loc1[loc3];
                if (arg1[loc2]) 
                {
                    (this._valueTxtArr4[loc3] as Object /* flash.text.TextField */).text = Language.getStringByParam(30083, arg1[loc2]);
                }
                else 
                {
                    (this._valueTxtArr4[loc3] as Object /* flash.text.TextField */).text = Language.getString(30084);
                }
                ++loc3;
            }
            return;
        }

        /* internal  */init(): void
        {
            this._cache = Cache.instance.role;
            var loc1=ObjCreate.createBg(7, 2, 390, 85, this);
            var loc2=ObjCreate.createBg(7, 90, 390, 125, this);
            var loc3=ObjCreate.createBg(7, 218, 390, 65, this);
            var loc4=ObjCreate.createBg(7, 286, 390, 65, this);
            var loc5=ObjCreate.createBg(7, 354, 390, 45, this);
            this._nameTf1 = new GTextFormat("", 12, 16705250);
            this._nameTf2 = new GTextFormat("", 12, 16776960);
            this._nameTf3 = new GTextFormat("", 12, 65280);
            this._nameTf4 = new GTextFormat("", 12, 16750848);
            this._valueTf = new GTextFormat("", 12, 16777113);
            if (this._cache.entityInfo.sex == ESex._ESexMan) 
            {
                this._infoNameArr4[4] = Language.getString(30154);
            }
            this.createAttrTextField(this, 12, 103, 3, [120, 250], this._nameTf2, this._infoNameArr2, true);
            this.createAttrTextField(this, 12, 220, 3, [120, 250], this._nameTf3, this._infoNameArr3, true, 0, true);
            this.createAttrTextField(this, 12, 290, 2, [200], this._nameTf4, this._infoNameArr4, true);
            this._valueTxtArr2 = this.createAttrTextField(this, 45, 103, 3, [125, 255], this._valueTf, null, false, 15);
            this._valueTxtArr3 = this.createAttrTextField(this, 45, 220, 3, [125, 255], this._valueTf, null, false, 9, true, true);
            this._valueTxtArr4 = this.createAttrTextField(this, 72, 290, 2, [200], this._valueTf, null, false, 6);
            return;
        }

        /* internal */ /* var */_infoNameArr1: Array<any>;

        /* internal */ /* var */_infoNameArr2: Array<any>;

        /* internal */ /* var */_infoNameArr3: Array<any>;

        /* internal */ /* var */_infoNameArr4: Array<any>;

        /* internal */ /* var */_infoNameOtherArr1: Array<any>;

        /* internal */ /* var */_infoNameArr5B: Array<any>;

        /* internal */ /* var */_infoNameArr5C: Array<any>;

        /* internal */ /* var */_nameTxtArr1: Array<any>;

        /* internal */ /* var */_valueTxtArr1: Array<any>;

        /* internal */ /* var */_valueTxtOtherArr1: Array<any>;

        /* internal */ /* var */_valueTxtArr2: Array<any>;

        /* internal */ /* var */_valueTxtArr3: Array<any>;

        /* internal */ /* var */_valueTxtArr4: Array<any>;

        /* internal */ /* var */_valueTxtArr5: Array<any>;

        /* internal */ /* var */_tipsArr: Array<any>;

        /* internal */ /* var */_cache: RoleCache;

        /* internal */ /* var */_worldLevelSp: Object /* flash.display.Sprite */;

        /* internal */ /* var */_nameTf1: Object /* flash.text.TextFormat */;

        /* internal */ /* var */_nameTf2: Object /* flash.text.TextFormat */;

        /* internal */ /* var */_nameTf4: Object /* flash.text.TextFormat */;

        /* internal */ /* var */_valueTf: Object /* flash.text.TextFormat */;

        /* internal */ /* var */_mode: string="自己";

        /* internal */ /* var */_vipImg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_nameTf3: Object /* flash.text.TextFormat */;

        /* internal */ /* var */_infoNameArr5A: Array<any>;
    }
